(function () {
    return {
        initControl: function (oControl) {
            var v = oControl.value;
            oControl.isContainer = true;

            v.ratio = 0;//["填充","自动",1,2,...12]
        },
        compile: function (compileContext, doc, entity) {
            var cc = compileContext;
            var tc = cc.templateCoder;

            var v = entity.value;
            var cls = ["column"];
            if (v.ratio) {
                if( v.ratio === 1 ){
                    cls.push("is-narrow");
                }else{
                    cls.push("is-"+(v.ratio-1));
                }
            }


            

            tc.add("<div class=\"");
            tc.add(cls.join(" "));
            tc.add("\"");
            tc.add(">");
            $.each(entity.children, function (ec) {
                compileContext.compile(ec);
            });
            tc.add("</div>");
        }
    }
})();